package com.zjj.dao;

import com.zjj.pojo.Student;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface StudentMapper {

    @Select("SELECT * FROM s_student WHERE id = #{id}")
    Student selectStudentById(int id);

    @Update("UPDATE s_student SET name = #{name}, age = #{age} WHERE id = #{id}")
    int updateStudent(Student student);

    @Select("SELECT * from s_student where cid = #{classId}")
    Student selectStudentByClassId(int classId);

}
